package com.ruoyi.kucun.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 核心库存对象 inventory
 * 
 * @author Rosou
 * @date 2025-06-17
 */
public class Inventory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 库存ID */
    private Long inventoryId;

    /** 商品ID（外键） */
    @Excel(name = "商品ID", readConverterExp = "外=键")
    private Long productId;

    /** 当前库存数量 */
    @Excel(name = "当前库存数量")
    private Long currentQuantity;

    /** 最后盘点时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "最后盘点时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastCheckTime;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastUpdateTime;

    public void setInventoryId(Long inventoryId) 
    {
        this.inventoryId = inventoryId;
    }

    public Long getInventoryId() 
    {
        return inventoryId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setCurrentQuantity(Long currentQuantity) 
    {
        this.currentQuantity = currentQuantity;
    }

    public Long getCurrentQuantity() 
    {
        return currentQuantity;
    }

    public void setLastCheckTime(Date lastCheckTime) 
    {
        this.lastCheckTime = lastCheckTime;
    }

    public Date getLastCheckTime() 
    {
        return lastCheckTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) 
    {
        this.lastUpdateTime = lastUpdateTime;
    }

    public Date getLastUpdateTime() 
    {
        return lastUpdateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("inventoryId", getInventoryId())
            .append("productId", getProductId())
            .append("currentQuantity", getCurrentQuantity())
            .append("lastCheckTime", getLastCheckTime())
            .append("lastUpdateTime", getLastUpdateTime())
            .toString();
    }
}
